from flask import Flask
from flask_restx import Api, Resource

app = Flask(__name__)
# 创建api 实例对象
api = Api(app)

# 添加路由
@api.route('/hello')
# 类要继续Resource模块
class Hello(Resource):
    def get(self):
        return {
            "hello": "word"
        }


if __name__ == '__main__':
    app.run(host="0.0.0.0", debug=True)
